<footer class="footer">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-6">
                    Copyright © 2018 - 现在. <a href="./">易航防洪系统提供服务！</a>
                </div>
            </div>
        </div>
    </footer>
   <script src="../assets/js/app.min.js"></script>
<script src="../assets/js/vendor/jquery-jvectormap-1.2.2.min.js"></script>
<script src="../assets/js/vendor/jquery-jvectormap-world-mill-en.js"></script>
<script src="../assets/layuiadmin/layui/layui.all.js"></script>
<script src="../assets/js/vue.js"></script>
<script src="//lib.baomitu.com/layer/3.1.1/layer.js"></script>
<script>
var items = $("select[default]");
for (i = 0; i < items.length; i++) {
	$(items[i]).val($(items[i]).attr("default")||0);
}
function saveSetting(obj){
	if($("input[name='fenzhan_domain']").length>0){
		var fenzhan_domain = $("input[name='fenzhan_domain']").val();
		$("input[name='fenzhan_domain']").val(fenzhan_domain.replace("，",","));
	}
	if($("input[name='fenzhan_remain']").length>0){
		var fenzhan_remain = $("input[name='fenzhan_remain']").val();
		$("input[name='fenzhan_remain']").val(fenzhan_remain.replace("，",","));
	}
	var ii = layer.load(2, {shade:[0.1,'#fff']});
	$.ajax({
		type : 'POST',
		url : 'ajax.php?act=set',
		data : $(obj).serialize(),
		dataType : 'json',
		success : function(data) {
			layer.close(ii);
			if(data.code == 0){
				layer.alert('设置保存成功！', {
					icon: 1,
					closeBtn: false
				}, function(){
				  window.location.reload()
				});
			}else{
				layer.alert(data.msg, {icon: 2})
			}
		},
		error:function(data){
			layer.msg('服务器错误');
			return false;
		}
	});
	return false;
}
function changehaohaomb(haohaomb){
	var ii = layer.load(2, {shade:[0.1,'#fff']});
	$.ajax({
		type : 'POST',
		url : 'ajax.php?act=set',
		data : {haohaomb:haohaomb, haohaomb_m:"0"},
		dataType : 'json',
		success : function(data) {
			layer.close(ii);
			if(data.code == 0){
				layer.alert('更换模板成功！', {
					icon: 1,
					closeBtn: false
				}, function(){
				  window.location.reload()
				});
			}else{
				layer.alert(data.msg, {icon: 2})
			}
		},
		error:function(data){
			layer.msg('服务器错误');
			return false;
		}
	});
}
function logout(){
	layer.confirm('您是否退出本次登录？',{btn:['确定','取消'],closeBtn:0,icon:3},function(){
		var ii = layer.msg('正在退出', {icon: 16,time: 0});
		$.ajax({
			type : "get",
			url : "ajax.php?act=login&logout",
			dataType : 'json',
			success : function(data){
				layer.close(ii);
				if(data.code == 0){
                    layer.msg(data.msg,{icon:1,time:2000,end:function(){window.location.href="./login.php"}});
				}
			}
		});
	},function(){});
};
function gxcx(){
    var ii = layer.msg('正在更新中,请稍后...', {icon: 16, time: 10 * 1000});
      $.ajax({
          type : 'POST',
          url : 'ajax.php?act=od',
          dataType : 'json',
          success : function(data) {
              layer.close(ii);
              if(data.code == 1){
				layer.alert(data.msg, {
					icon: 6,
					closeBtn: false
				}, function(){
				  window.location.reload()
				});
			}else if(data.code == -2){
					layer.alert(data.msg,{
						icon: 5,
						closeBtn: false,
                        btn: ['重试更新','放弃更新']
					}, function(){
					  gxcx();	
					});
			}else{
                  layer.msg(data.msg, {icon: 5})
              }
          },
          error:function(data){
              layer.msg('服务器错误', {icon: 5});
              return false;
          }
      });
    return false;
}
</script>